<html>
<head><meta charset="utf-8"><title>Codegen process question · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Codegen.20process.20question.html">Codegen process question</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215832556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Codegen%20process%20question/near/215832556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> sasurau4 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Codegen.20process.20question.html#215832556">(Nov 06 2020 at 11:18)</a>:</h4>
<p>Hey all. I have a question about codegen process. <br>
I'm working on <a href="https://github.com/rust-lang/rust/pull/78570">https://github.com/rust-lang/rust/pull/78570</a><br>
I found some tests like <code>src/test/ui/print_type_sizes/multiple_type.rs</code> emit type sizes to stdout when using <code>check-pass</code>.<br>
On the other hand, some tests like <code>src/test/ui/print_type_sizez/generics.rs</code> are NOT emit type sizes when using <code>check-pass</code> and fail UI test because of the diff.<br>
Why same debug flag behave differently?<br>
I suspect the diff of two tests are whether using function <code>()</code> or not. I know the difference of <code>check-pass</code> and <code>build-pass</code> is whether skipping codegen or not.<br>
Is the codegen process affect function calling?</p>



<a name="215836807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Codegen%20process%20question/near/215836807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Codegen.20process.20question.html#215836807">(Nov 06 2020 at 12:07)</a>:</h4>
<p>The type sizes are likely only printed when the actual layout is computed. For generic types, this only happens during codegen.</p>



<a name="215839826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Codegen%20process%20question/near/215839826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> sasurau4 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Codegen.20process.20question.html#215839826">(Nov 06 2020 at 12:37)</a>:</h4>
<p>Thanks for reply! <br>
Is it better using <code>build-pass</code> for print_type_sizes tests even if tests pass with <code>check-pass</code>. I think these tests should be agnostic when the actual layout is computed.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>